import VueRouter from 'vue-router';

import home from './components/tabbar/home.vue';
import member from './components/tabbar/member.vue';
import search from './components/tabbar/search.vue';
import shopcar from './components/tabbar/shopcar.vue';
import newslist from './components/news/newslist.vue';
import newsinfo from './components/news/newsinfo.vue';
// 3. 创建路由对象
var router = new VueRouter({
  routes: [
    { path: '/', redirect: '/home' },
    { path: '/home', component: home },
    { path: '/member', component: member },
    { path: '/search', component: search },
    { path: '/shopcar', component: shopcar },
    { path: '/home/newslist', component: newslist },
    { path: '/home/newslist/newsinfo', component: newsinfo },
  ],
  linkActiveClass: 'mui-active', //覆盖默认路由高亮的类 router-link-active
});

// 把路由对象暴露出去
export default router;
